﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WriteBugs.Library.Model
{
    [Serializable]
    public class Excerpt
    {  
        /// <summary>
        /// 标题
        /// </summary>
        public string Title { get; set; }

        /// <summary>
        /// 类型：目录/摘抄
        /// </summary>
        public ExcerptType ExcerptType { get; set; }

        /// <summary>
        /// 代码
        /// </summary>
        public string Code { get; set; } = String.Empty;

        /// <summary>
        /// 子内容
        /// </summary>
        public ObservableCollection<Excerpt> Childen { get; set; } = new ObservableCollection<Excerpt>();

        public Excerpt Parent { get; set; }

        public DateTime LastUpdateTime { get; set; }

        public override string ToString()
        {
            return Title;
        }
    }
}
